<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var arr=[1,2,[3,4],5,[6,7,[8,9],10],11]
        function isDeepCopy(arr){
            var arr1=[];
            for(var k in arr){
                if(Array.isArray(arr[k])){
                   var a= isDeepCopy(arr[k])
                   arr1.push(a);
                }else{
                    arr1.push(arr[k]);
                }
            }
            return arr1;
        }
        var newArr =isDeepCopy(arr)
        newArr[2].push('a')
        console.log(arr);
        console.log(newArr);
    </script>
</body>
</html>